package com.analysis.apresunday.service.impl;

import com.analysis.apresunday.mapper.AnalysisProvinceMapper;
import com.analysis.apresunday.entity.po.AnalysisProvince;
import com.analysis.apresunday.service.AnalysisProvinceService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AnalysisProvinceServiceImpl extends ServiceImpl<AnalysisProvinceMapper, AnalysisProvince> implements AnalysisProvinceService {

    @Override
    public List<AnalysisProvince> getProvinceList() {
        QueryWrapper<AnalysisProvince> query = new QueryWrapper<>();
        query.orderByDesc("id");
        query.last("limit 34");
        List<AnalysisProvince> analysisProvinces = baseMapper.selectList(query);
        return analysisProvinces;
    }
}
